#include <stdio.h>
#include <stdlib.h>

// 动态分配一块内存空间存储数组

int main(){

    int *p;
    int n = 5;
    p = (int *)malloc(sizeof(int) * n);

    p[0] = 1;
    p[1] = 2;
    p[2] = 3;
    p[3] = 4;
    p[4] = 5;

    printf("%d\n", p[2]);

    return 0;
}